﻿@model IEnumerable<HumanResourceSystem.Models.EmployeeNew>

@{
    ViewBag.Title = "Index";
    Layout = "~/Views/Shared/_Layout.cshtml";
}

<h2>员工档案</h2>


<p>
    @Html.ActionLink("创建新的员工档案", "Create")

    @using (Html.BeginForm())
    {
    <p>
       
        部门查询: @Html.DropDownList("EmployeeGenreDe", "All")
        Sex: @Html.DropDownList("EmployeeGenreSex", "All")
        员工号查询： @Html.TextBox("SearchStringIDCard")
        <input type="submit" value="查询" />
        姓名查询： @Html.TextBox("SearchStringName")
        <input type="submit" value="查询" /><br />
        年龄查询： @Html.TextBox("SearchStringAge")
        <input type="submit" value="查询" />
    </p>
    }
@using (Html.BeginForm("Index", "EmployeeNews", FormMethod.Post))
{
    <p>
        清除查询结果：
        <input type="submit" value="清除查询" />
    </p>
}
    </p>
<table class="table">
    <tr>
        <th>
            @Html.DisplayNameFor(model => model.IDCard)
        </th>

        <th>
            @Html.DisplayNameFor(model => model.Department)
        </th>

        <th>
            @Html.DisplayNameFor(model => model.Name)
        </th>
        <th>
            @Html.DisplayNameFor(model => model.Age)
        </th>
        <th>
            @Html.DisplayNameFor(model => model.Sex)
        </th>
        <th>
            @Html.DisplayNameFor(model => model.Phone)
        </th>
        <th>
            @Html.DisplayNameFor(model => model.Home)
        </th>
        <th>
            @Html.DisplayNameFor(model => model.Edu)
        </th>
        <th>
            @Html.DisplayNameFor(model => model.Tech)
        </th>
        <th>
            @Html.DisplayNameFor(model => model.Work)
        </th>
        <th>
            @Html.DisplayNameFor(model => model.Date)
        </th>
    </tr>

@foreach (var item in Model) {
    <tr>
        <td>
            @Html.DisplayFor(modelItem => item.IDCard)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.Department)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.Name)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.Age)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.Sex)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.Phone)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.Home)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.Edu)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.Tech)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.Work)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.Date)
        </td>

        <td>
            @Html.ActionLink("编辑", "Edit", new { id=item.Id }) |
            @Html.ActionLink("详细", "Details", new { id=item.Id }) |
            @Html.ActionLink("删除", "Delete", new { id=item.Id })
        </td>
    </tr>
}
    

</table>
